#pragma once

#include <APPDefines.h>

namespace UI
{
	class uPicture 
	{
	public:
		uPicture(void);
		virtual ~uPicture(void);

		HRESULT Load(LPDIRECT3DDEVICE9 pDevice , const char* strFile , FRECT* pImageSize);
		void SetPos(D3DXVECTOR3 vecPos , D3DXVECTOR2 vecSize);

		virtual void Render();

	protected:

		LPDIRECT3DDEVICE9 m_pDevice;
		LPDIRECT3DTEXTURE9 m_pTexture;
		LPDIRECT3DTEXTURE9 m_pAlphaTex;

		LPDIRECT3DVERTEXDECLARATION9 m_ppDecl;

		LPDIRECT3DVERTEXBUFFER9 m_pVBuff;
		LPDIRECT3DVERTEXBUFFER9 m_pTBuff;
		LPDIRECT3DINDEXBUFFER9 m_pIBuff;

		float m_fx;
		float m_fy;
		float m_fWidth;
		float m_fHeight;
		DWORD dwVertexType;
		DWORD dwVertexType2;

		D3DXMATRIX m_matPos;
		D3DXMATRIX m_matTex;
		float fAngle;

	};

};